import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'
import Home from '@/pages/home'
import OrdersList from './pages/orders/OrdersList'
import Merchant from './pages/merchant/view/Merchant'
import Workbenth from '@/pages/WorkBench'
import RoleManagement from '@/pages/system/RoleManagement'
import Login from '@/pages/login/Login'
import Brand from '@/pages/merchant/view/Brand'
import Shop from '@/pages/merchant/view/Shop'
import MerchantInfo from '@/pages/merchant/view/MerchantInfo'
import Salesrevenuedetails from './pages/finance/Salesrevenuedetails'
import StoreSalesDaily from './pages/finance/StoreSalesDaily'
import StoreSalesReport from './pages/finance/StoreSalesReport'
import Storestatement from './pages/finance/Storestatement'
import Management from './pages/orders/Management'
import Reservation from './pages/orders/Reservation'
import LoginIndex from '@/pages/login'
import Forget from '@/pages/login/Forget'
import ProductList from './pages/product/ProductList'
import Productshow from './pages/product/Productshow'
import Customer from '@/pages/operation/Customer'
import AccountManagement from './pages/system/AccountManagement'
import PrintTemplate from './pages/system/PrintTemplate'
import Partition from '@/pages/merchant/view/Partition'
import PrinterSet from '@/pages/merchant/view/PrinterSet'
import Echarts from '@/pages/merchant/view/Echarts'
import PrinterList from '@/pages/merchant/view/PrinterList'
import ShopInfo from '@/pages/merchant/view/ShopInfo'
import Yun from './pages/operation/Yun'
import ProductType from '@/pages/product/ProductType.tsx'
import Permissions from '@/pages/system/Permissions'
import Combo from './pages/product/Combo'
import Productedit from '@/pages/product/Productedit'
import Combolist from './pages/product/Combolist'
import Keorder from './pages/operation/Keorder'
import Products from './pages/operation/Products'
import ShopCate from './pages/operation/ShopCate'
import Comboshow from './pages/product/Comboshow'
import BindList from './pages/merchant/view/BindList'
import Register from './pages/login/Register'
function App() {
    return (
        <>
            <BrowserRouter>
                <Routes>
                    <Route path="/" element={<Home />}>
                        {/* 重定向到登录 */}
                        <Route
                            path="/"
                            element={<Navigate to="login"></Navigate>}
                        />
                        {/* 订单列表 */}
                        <Route path="order-list" element={<OrdersList />} />
                        {/* 商户列表 */}
                        <Route path="merchant-list" element={<Merchant />} />
                        {/* 商户信息 */}
                        <Route
                            path="merchant-info"
                            element={<MerchantInfo />}
                        />
                        {/* 品牌列表 */}
                        <Route path="brand-list" element={<Brand />} />
                        {/* 店铺列表 */}
                        <Route path="shop-list" element={<Shop />} />
                        {/* 分区列表 */}
                        <Route path="area-list" element={<Partition />} />
                        {/* 外卖平台绑定列表  */}
                        <Route
                            path="platform-bind-list"
                            element={<BindList />}
                        />
                        {/* 店铺信息 */}
                        <Route path="shop-info" element={<ShopInfo />} />
                        {/* 打印机设置 */}
                        <Route path="printer-set" element={<PrinterList />} />
                        {/* 打印机列表 */}
                        <Route path="printer-list" element={<PrinterSet />} />
                        {/* 工作台 */}
                        <Route path="workbenth" element={<Workbenth />} />
                        {/* 平台订单列表 */}
                        <Route
                            path="platform-order-list"
                            element={<OrdersList />}
                        />
                        {/* 订单管理 */}
                        <Route path="orders-admin" element={<Management />} />
                        {/* 预定订单列表 */}
                        <Route
                            path="pre-order-list"
                            element={<Reservation />}
                        />
                        {/* 商品列表 */}
                        <Route path="product-list" element={<ProductList />} />
                        {/* 商品分类 */}
                        <Route
                            path="product-classify"
                            element={<ProductType />}
                        />
                        {/* 商品详情 */}
                        <Route path="productshow" element={<Productshow />} />
                        {/* 套餐设置 */}
                        <Route path="set-menu" element={<Combo />} />
                        {/* 角色管理 */}
                        <Route
                            path="print-template"
                            element={<PrintTemplate />}
                        />
                        {/* 客户分析 */}
                        <Route path="client-analyse" element={<Customer />} />
                        {/* 客单分析 */}
                        <Route
                            path="per-customer-analyse"
                            element={<Keorder />}
                        />
                        {/* 运营分析 */}
                        <Route path="operations-analyse" element={<Yun />} />
                        {/* 产品分析 */}
                        <Route path="product-analyse" element={<Products />} />
                        {/* 商品分类销售分析 */}
                        <Route
                            path="product-classify-analyse"
                            element={<ShopCate />}
                        />
                        {/* 角色管理 */}
                        <Route path="role-admin" element={<RoleManagement />} />
                        {/*用户管理*/}
                        <Route
                            path="user-admin"
                            element={<AccountManagement />}
                        />
                        {/*打印模板*/}
                        <Route
                            path="print-template"
                            element={<PrintTemplate />}
                        />

                        <Route path="Combolist" element={<Combolist />} />
                        <Route path="Comboshow" element={<Comboshow />} />
                        {/*用户权限管理*/}
                        <Route path="permissions" element={<Permissions />} />
                        {/* 财务管理 */}
                        <Route
                            path="shop-income"
                            element={<Salesrevenuedetails />}
                        />
                        {/*门店销售报表*/}
                        <Route path="shop-bill" element={<StoreSalesDaily />} />
                        {/*商品修改*/}
                        <Route path="/producteidt" element={<Productedit />} />
                        {/*店铺对账单*/}
                        <Route
                            path="market-income"
                            element={<StoreSalesReport />}
                        />
                        {/*销售收入明细*/}
                        <Route path="shop-daily" element={<Storestatement />} />
                        {/*门店销售日报*/}
                        <Route path="shop-daily" element={<Echarts />} />
                        {/*商品添加*/}
                        <Route path="/productshow" element={<Productshow />} />
                    </Route>

                    <Route path="/login" element={<LoginIndex />}>
                        {/* 登录 */}
                        <Route index element={<Login />} />
                        {/* 注册 */}
                        <Route path="register" element={<Register />} />
                        {/* 忘记密码 */}
                        <Route path="forget" element={<Forget />} />
                    </Route>
                </Routes>
            </BrowserRouter>
        </>
    )
}

export default App
